// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
// jsdoc语法提示教程：https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129



const db = uniCloud.databaseForJQL();

module.exports = {

	async add(data) {
		await db.collection('articles').add(data);
	},

	async detail(_id) {
		const data = await db.collection('articles').doc(_id).get();
		return data
	}

}